package com.qxzn.app.api.api;

import com.qxzn.app.bean.AlbumPictureBean;
import com.qxzn.app.bean.AuthInfoBean;
import com.qxzn.app.bean.BannerBean;
import com.qxzn.app.bean.BaseBean;
import com.qxzn.app.bean.BindRobotBean;
import com.qxzn.app.bean.BindRobotUserBean;
import com.qxzn.app.bean.ContactBean;
import com.qxzn.app.bean.ContactsBean;
import com.qxzn.app.bean.EmergencyContactBean;
import com.qxzn.app.bean.FaceDetectionBean;
import com.qxzn.app.bean.FaceIdListBean;
import com.qxzn.app.bean.KeyBean;
import com.qxzn.app.bean.LatestVersionBean;
import com.qxzn.app.bean.LeaveVoiceMsgBean;
import com.qxzn.app.bean.MedicineCaseDetailBean;
import com.qxzn.app.bean.MedicineCaseRecordBean;
import com.qxzn.app.bean.MedicineRemindBean;
import com.qxzn.app.bean.MedicineRemindDetailBean;
import com.qxzn.app.bean.MsgBean;
import com.qxzn.app.bean.NewsMessageBean;
import com.qxzn.app.bean.OtherFamilyMemberBean;
import com.qxzn.app.bean.RobotDetails;
import com.qxzn.app.bean.RobotDeviceListBean;
import com.qxzn.app.bean.RobotNightModeBean;
import com.qxzn.app.bean.SendMsgSuccessBean;
import com.qxzn.app.bean.TuyaTokenBean;
import com.qxzn.app.bean.TuyaUidBean;
import com.qxzn.app.bean.UserDetails;
import com.qxzn.app.bean.UserInfoBean;
import com.qxzn.app.bean.UserRemindBean;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface ApiService {
    /**
     * 首页
     */
//------------------------------- 机器人 -------------------------------
    // 用户根据家庭密码绑定机器人【桌面版 app公用】
    @POST("/api/deskapp_desk_user/devicebinding_family_password")
    Call<BaseBean> bindingByPassword(@Body RequestBody body);

    //用户请求绑定机器人
    @POST("/api/deskapp_desk_user/device_binding")
    Call<BaseBean> bingingByAsk(@Body RequestBody body);

    //解除绑定与转让
    @POST("/api/deskapp_desk_user/device_del")
    Call<BaseBean> unbindRobot(@Body RequestBody body);

    //获取机器人详情
    @POST("/api/deskapp_desk_user/robotmeans")
    Call<BaseBean<RobotDetails>> getRobotDetails(@Body RequestBody body);

    //修改机器人名称
    @POST("/api/deskapp_desk_user/robot_name")
    Call<BaseBean> updateRobotDetails(@Body RequestBody body);

    //管理员转让机器人
    @POST("/api/deskapp_desk_user/trans")
    Call<BaseBean> updateRobotAdmin(@Body RequestBody body);

    // 查看机器人是否有管理员
    @POST("/api/deskrobot_desk_user/robot_getroles")
    Call<BaseBean> getRobotRoles(@Body RequestBody body);

    // 查看夜间模式
    @POST("/api/deskapp_pattern/get_deskapp_pattern")
    Call<BaseBean<List<RobotNightModeBean>>> getRobotNightMode(@Body RequestBody body);

    // 设置夜间模式
    @POST("/api/deskapp_pattern/add_deskapp_pattern")
    Call<BaseBean> configRobotNightMode(@Body RequestBody body);

    // 根据紧急类型查看联络人列表
    @POST("/api/deskrobot_desk_device/get_byemergency_contact")
    Call<BaseBean<List<EmergencyContactBean>>> getEmergencyContact(@Body RequestBody body);

    // 用户添加紧急联络人
    @POST("/api/deskrobot_desk_device/addemergency_contact")
    Call<BaseBean> addEmergencyContact(@Body RequestBody body);

    // 用户修改紧急联络人
    @POST("/api/deskrobot_desk_device/updeemergency_contact")
    Call<BaseBean> updateEmergencyContact(@Body RequestBody body);

    //用户删除紧急联络人
    @POST("/api/deskrobot_desk_device/deleteemergency_contact")
    Call<BaseBean> deleteEmergencyContact(@Body RequestBody body);

    //呼叫紧急联络人时发短信
    @POST("/api/deskrobot_desk_device/emergency_message")
    Call<BaseBean> sendMsgEmergencyContact(@Body RequestBody body);

    //------------------------------- 我的 -------------------------------
    @POST("/api/deskrobot_desk_user/userPersonal")
    Call<BaseBean<UserDetails>> getUserInfoDetail(@Body RequestBody body);

    // app修改个人详情
    @POST("/api/deskapp_desk_user/updeuser")
    Call<BaseBean> updateUserInfoDetail(@Body RequestBody body);

    // 修改安全密码
    @POST("/api/deskrobot_desk_user/updedesk_password")
    Call<BaseBean> updateSecurityPwd(@Body RequestBody body);

    // 管理员设置家庭密码
    @POST("/api/deskrobot_desk_user/device_family_password")
    Call<BaseBean> updateFamilyPwd(@Body RequestBody body);


    //-------------------------------http://10.10.12.176:8090的接口-------------------------------
    @POST("api/user/getkey")
    Call<ResponseBody> getAIUIKey(@Body RequestBody body);


    //-------------------------------http://10.10.9.3:8090的接口-------------------------------
    @POST("/api/user/robot/getKey")
//微服务获取key
//    @POST("api/user/getkey")
    Call<KeyBean> getKey(@Body RequestBody body);

    //登录
    @POST("/api/user/robot/login")
    Call<BaseBean<KeyBean.DataBean>> login(@Body RequestBody body);

    //注册
    @Multipart
    @POST("/api/deskapp_desk_user/register")
    Call<BaseBean<KeyBean.DataBean>> register(@Part("username") RequestBody phone, @Part("niname") RequestBody nickname, @Part("userpwd") RequestBody pwd,
                                              @Part("desk_password") RequestBody security_pwd, @Part("gender") RequestBody sex, @Part("birthday") RequestBody birth,
                                              @Part("stature") RequestBody height, @Part("weight") RequestBody weight, @Part MultipartBody.Part file);

    //检测手机号是否注册
    @POST("/api/deskrobot_desk_user/getphone")
    Call<BaseBean> checkPhoneRegister(@Body RequestBody body);

    //获取验证码
    @POST("/api/deskrobot_desk_user/verification_code")
    Call<BaseBean> getCode(@Body RequestBody body);

    //验证短信验证码是否正确
    @POST("/api/deskrobot_desk_user/proveverification_code")
    Call<BaseBean> verifyCode(@Body RequestBody body);

    //修改或重置密码
    @POST("/api/deskapp_desk_user/updeuserpassword")
    Call<BaseBean> updatePwd(@Body RequestBody body);

    //获取通讯录不包括自己
    @POST("/api/deskrobot_user/get_dirlist")
    Call<BaseBean<ContactsBean>> getContact(@Body RequestBody body);

    //获取通讯录包括自己
    @POST("/api/deskrobot_desk_device/userlistall")
    Call<BaseBean<List<ContactBean>>> getContact1(@Body RequestBody body);

    //app查询所有任务提醒
    @POST("/api/deskapp_medical/desktopmedicine_task_reminderlist")
    Call<BaseBean<List<UserRemindBean>>> getUserRemindList(@Body RequestBody body);

    //添加任务提醒
    @POST("/api/deskrobot_medical/task_reminder_add")
    Call<BaseBean> addRemind(@Body RequestBody body);

    //更新任务提醒
    @POST("/api/deskrobot_medical/task_reminder_upd")
    Call<BaseBean> updateRemind(@Body RequestBody body);

    //删除任务提醒
    @POST("/api/deskrobot_medical/task_reminder_dele")
    Call<BaseBean> delRemind(@Body RequestBody body);

    //用户查看图片列表
    @POST("/api/deskapp_desk_user/getfamily_album_list")
    Call<BaseBean<List<AlbumPictureBean>>> getAlbumList(@Body RequestBody body);

    //用户删除相册图片
    @POST("/api/deskapp_desk_user/delete_family_album")
    Call<BaseBean> delAlbumPicture(@Body RequestBody body);

    //获取涂鸦UID
    @POST("/api/tuya/user/uid")
    Call<BaseBean<TuyaUidBean>> getTuyaUid(@Body RequestBody body);

    //获取涂鸦Token
    @POST("/api/tuya/token")
    Call<BaseBean<TuyaTokenBean>> getTuyaToken(@Body RequestBody body);

    //通知服务器配网成功
    @POST("/api/tuya/client/dev")
    Call<BaseBean> notifyServer(@Body RequestBody body);

    //管理员处理用户申请绑定机器人
    @POST("/api/deskapp_desk_user/device_auth")
    Call<BaseBean> authMember(@Body RequestBody body);

    //用户请求绑定机器人
    @POST("/api/deskapp_desk_user/device_binding")
    Call<BaseBean<BindRobotBean>> bingDevice(@Body RequestBody body);

    //管理员删除该设备所绑定的用户
    @POST("/api/deskapp_desk_user/device_auth_del")
    Call<BaseBean> adminDelMember(@Body RequestBody body);

    //管理员邀请家庭成员
    @POST("/api/deskapp_desk_user/invitation")
    Call<BaseBean> invitationMember(@Body RequestBody body);

    //用户处理管理员的邀请
    @POST("/api/deskapp_desk_user/agree_invitation")
    Call<BaseBean> agreeInvitation(@Body RequestBody body);

    //获取当前所有的用户（管理员可查未绑定用户）
    @POST("/api/deskapp_desk_user/device_auth_user")
    Call<ResponseBody> getFamilyMember(@Body RequestBody body);

    //根据排序获取当前机器人下的其他成员
    @POST("/api/deskapp_desk_user/desk_usersorting")
    Call<BaseBean<List<OtherFamilyMemberBean>>> getMembers(@Body RequestBody body);

    //添加给予授权的家庭成员
    @POST("/api/deskrobot_desk_user/addroles_memname")
    Call<BaseBean> addRolesToMember(@Body RequestBody body);

    //删除给予授权的家庭成员
    @POST("/api/deskrobot_desk_user/deleteroles_memname")
    Call<BaseBean> delRolesToMember(@Body RequestBody body);

    //视频通话请求通话推送
    @POST("/api/deskrobot_pushExample/pushvideo")
    Call<BaseBean> requestVideoChat(@Body RequestBody body);

    //获取聊天记录
    @POST("/api/deskrobot_uesrchat/chatlist")
    Call<BaseBean<MsgBean>> getMsgList(@Body RequestBody body);

    //根据id获取聊天信息
    @POST("/api/deskrobot_uesrchat/chatByid")
    Call<BaseBean<MsgBean.ResultBean>> getMsgById(@Body RequestBody body);

    //查看APP发送的未读留言信息
    @POST("/api/deskapp_medical/leavinglistbydevice")
    Call<BaseBean<LeaveVoiceMsgBean>> getUnreadLeaveMsg(@Body RequestBody body);

    //修改APP发送的未读留言信息的状态为已读
    @POST("/api/deskapp_medical/updleavingstate")
    Call<BaseBean> updateUnreadLeaveMsg(@Body RequestBody body);

    //app查看语音留言
    @POST("/api/deskapp_medical/leaving_messagelist")
    Call<BaseBean<MsgBean>> getVoiceMsgList(@Body RequestBody body);

    @Multipart
    //app添加语音留言
    @POST("/api/deskapp_medical/addleaving_message")
    Call<BaseBean<SendMsgSuccessBean>> sendMsg(@Part("device_id") RequestBody device_id, @Part("username") RequestBody username, @Part("timelength") RequestBody timelength,
                                               @Part("messagetype") RequestBody messagetype, @Part("recipient") RequestBody recipient, @Part MultipartBody.Part file);

    //app删除语音留言
    @POST("/api/deskapp_medical/delete_leaving_message")
    Call<BaseBean> dleMsg(@Body RequestBody body);


    //------------------------------------------旧接口----------------------------------------------

    //管理员获取当前所有未授权的用户，包含请求绑定但管理员还未授权的用户
    @POST("/api/desk_user/device_auth_user")
    Call<BindRobotUserBean> getBindRobotUser(@Body RequestBody body);

    //管理员授权用户使用设备
    @POST("/api/desk_user/device_auth")
    Call<BaseBean> deviceAuth(@Body RequestBody body);

    //管理员删除该设备所绑定的用户
    @POST("/api/desk_user/device_auth_del")
    Call<BaseBean> delDeviceAuth(@Body RequestBody body);

    //根据用户id查询所连接得机器人
    @POST("/api/deskapp_desk_user/deskByusername")
    Call<RobotDeviceListBean> getRobotDeviceList();

    //用户切换机器人
    @POST("/api/deskapp_desk_user/userchangedevice")
    Call<BaseBean> changeRobot(@Body RequestBody body);

    //查看个人详情
    @POST("/api/desk_user/userPersonal")
    Call<UserInfoBean> getUserInfo(@Body RequestBody body);

    //上传人脸照片
    @Multipart
    @POST("/api/facerecognition/addface_recognition")
    Call<BaseBean> uploadFaceID(@Part("device_id") RequestBody device_id, @Part("username") RequestBody username, @Part("roles") RequestBody roles, @Part("niname") RequestBody nickname, @Part MultipartBody.Part file);

    //修改人脸
    @Multipart
    @POST("/api/facerecognition/updface_recognition")
    Call<BaseBean> modifyFaceID(@Part("device_id") RequestBody device_id, @Part("username") RequestBody username, @Part("id") RequestBody id, @Part MultipartBody.Part file);

    //人脸修改头像
    @Multipart
    @POST("/api/deskrobot_facerecognition/updface_recognition")
    Call<BaseBean> modifyFace(@Part("device_id") RequestBody device_id, @Part("username") RequestBody username, @Part("id") RequestBody id, @Part MultipartBody.Part file);

    //人脸信息修改
    @POST("/api/facerecognition/updface_recognitioncontent")
    Call<BaseBean> modifyFaceInfo(@Body RequestBody body);

    //人脸删除
    @POST("/api/facerecognition/deleteface_recognition")
    Call<BaseBean> deleteFaceId(@Body RequestBody body);

    //人脸对比
    @Multipart
    @POST("/api/deskrobot_facerecognition/searchface_recognition")
    Call<BaseBean> searchFaceId(@Part("device_id") RequestBody device_id, @Part MultipartBody.Part file);

    //人脸检测
    @Multipart
    @POST("/api/deskrobot_facerecognition/detect_recognition")
    Call<BaseBean<FaceDetectionBean>> faceDetection(/*@Part("device_id") RequestBody device_id, */@Part MultipartBody.Part file);

    //已上传的人脸列表
    @POST("/api/facerecognition/face_recognitionlist")
    Call<FaceIdListBean> faceIdList(@Body RequestBody device_id);

    //根据版本类型查看最新版本。type:类型 1桌面版 2 安卓
    @POST("/api/edition/edition_last")
    Call<LatestVersionBean> checkLatestVersion(@Body RequestBody body);

    //查看通信录
    @POST("/api/desk_user/get_dirlist")
    Call<ContactsBean> getContacts(@Body RequestBody body);

    //修改个人头像
    @Multipart
    @POST("/api/desk_user/headportrait")
    Call<BaseBean> updateUserPortrait(@Part("username") RequestBody username, @Part MultipartBody.Part file);

    //修改个人信息
    @POST("/api/desk_user/updeuser")
    Call<BaseBean> updateUserInfo(@Body RequestBody body);

    //添加病例
    @Multipart
    @POST("/api/medical/case_add")
    Call<BaseBean> addCasesRecord(@Part("username") RequestBody username, @Part("device_id") RequestBody device_id, @Part("casename") RequestBody casename, @Part("content") RequestBody content, @Part List<MultipartBody.Part> file);

    //修改病例
    @Multipart
    @POST("/api/medical/case_upde")
    Call<BaseBean> updateCasesRecord(@Part("delepiid") RequestBody delepiid, @Part("id") RequestBody id, @Part("casename") RequestBody casename, @Part("content") RequestBody content, @Part List<MultipartBody.Part> file);

    //删除病例
    @POST("/api/medical/case_dele")
    Call<BaseBean> delCasesRecord(@Body RequestBody body);

    //添加吃药提醒
    @Multipart
    @POST("/api/medical/medicine_add")
    Call<BaseBean> addMedicineRemind(@Part("params") RequestBody params, @Part List<MultipartBody.Part> file);

    //修改吃药提醒
    @Multipart
    @POST("/api/medical/medicine_upde")
    Call<BaseBean> updateMedicineRemind(@Part("params") RequestBody params, @Part List<MultipartBody.Part> file);

    //修改吃药提醒开关状态
    @POST("/api/medical/medicine_updestate")
    Call<BaseBean> updateMedicineRemindState(@Body RequestBody body);

    //删除吃药提醒
    @POST("/api/medical/medicine_dele")
    Call<BaseBean> delMedicineRemind(@Body RequestBody body);

    //桌面版和app查询所有提醒吃药时间
    @POST("/api/medical/desktopmedicinelist")
    Call<MedicineRemindBean> getMedicineRemindTime(@Body RequestBody body);

    //桌面版和app根据提醒吃药id 查询详情
    @POST("/api/medical/desktopmedicineBymedid")
    Call<MedicineRemindDetailBean> getMedicineRemindDetail(@Body RequestBody body);

    //app根据用户名 查询全部用户病例
    @POST("/api/medical/caseListbyusername")
    Call<MedicineCaseRecordBean> getMedicineCaseRecord(@Body RequestBody body);

    //app根据病例id查询病例
    @POST("/api/medical/appcasebyid")
    Call<MedicineCaseDetailBean> getMedicineCaseDetail(@Body RequestBody body);

    @Multipart
    @POST("/api/upload/test")
    Call<ResponseBody> uploadFaceID1(@Part MultipartBody.Part file, @Part("device_id") RequestBody device_id, @Part("username") RequestBody username, @Part("roles") RequestBody roles, @Part("niname") RequestBody nickname);

    //获取首页的精选技能
    @POST("/api/app_currency/skill/list")
    Call<ResponseBody> getSkill(@Body RequestBody body);

    //获取娱乐页轮播图
    @POST("/api/app_currency/series/carousel")
    Call<BaseBean<List<BannerBean>>> getSeriesCarousel(@Body RequestBody body);

    //获取首页轮播图
    @POST("/api/app_currency/series/home")
    Call<BaseBean<List<BannerBean>>> getSeriesHome(@Body RequestBody body);

    //获取娱乐模块技能列表
    @POST("/api/app_currency/media_sections")
    Call<ResponseBody> getMediaSection(@Body RequestBody body);

    //获取娱乐更多
    @POST("/api/app_currency/media_list/details")
    Call<ResponseBody> getMediaList(@Body RequestBody body);

    //获取娱乐详情
    @POST("/api/app_currency/media_skill/details")
    Call<ResponseBody> getMediaDetails(@Body RequestBody body);

    //提交意见反馈
    @POST("/api/deskapp_feedback/add_feedback")
    Call<ResponseBody> addFeedback(@Body RequestBody body);

    //查询常见问题
    @POST("/api/deskapp_commonproblem/commonproblemList")
    Call<ResponseBody> getFaqList(@Body RequestBody body);

    //技能播放
    @POST("/api/app_currency/media_skill/play")
    Call<ResponseBody> mediaSkillPlay(@Body RequestBody body);

    //修改头像
    @Multipart
    @POST("/api/deskapp_desk_user/headportrait")
    Call<BaseBean> uploadUserHeader(@Part("username") RequestBody username, @Part MultipartBody.Part file);

    //查询用户日报
    @POST("/api/deskrobot_health_details/getdaily")
    Call<ResponseBody> getDaily(@Body RequestBody body);

    //查询所有指标最后一次检测数据
    @POST("/api/deskrobot_health_details/getlastlist")
    Call<ResponseBody> getLatList(@Body RequestBody body);

    //查询健康数据详情
    @POST("/api/deskrobot_health_details/querydataBytype")
    Call<ResponseBody> getDataByType(@Body RequestBody body);

    //查看所有医疗监测类型
    @POST("/api/deskrobot_health_details/Medical_typediseasestate")
    Call<ResponseBody> getTypeList(@Body RequestBody body);

    //获取技能详情
    @POST("/api/app_currency/skill/details")
    Call<ResponseBody> skillDetails(@Body RequestBody body);

    //消息中心消息列表
    @POST("/api/message/now")
    Call<BaseBean<List<NewsMessageBean>>> getNews(@Body RequestBody body);

    //查看与机器人的用户授权信息
    @POST("/api/deskapp_desk_user/auth_infor")
    Call<BaseBean<AuthInfoBean>> getAuthInfo(@Body RequestBody body);

}